package com.hdax.dm.user.rest.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdax.dm.api.LinkUserControllerApi;
import com.hdax.dm.entity.user.LinkUser;
import com.hdax.dm.user.dto.TicketBuyerDto;
import com.hdax.dm.user.mappers.ContactMapper;
import com.hdax.dm.user.service.ContactService;
import com.hdax.dm.utils.CommonResponse;
import com.hdax.dm.utils.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LinkUserRestService extends ServiceImpl<ContactMapper,LinkUser> implements LinkUserControllerApi {

    @Autowired
    private ContactService contactService;



    @Override
    public LinkUser linkUser(Long id, Long userId) {
        QueryWrapper<LinkUser> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("id",id);
        queryWrapper.eq("userId",userId);
        return baseMapper.selectOne(queryWrapper);
    }


}